export default {
  // 命名空间
  namespaced: true,
  state: {
    count: 0
  },
  mutations: {
    ADD (state, value) {
      state.count += value
    }
  },
  actions: {
    addDelay (context, value) {
      setTimeout(() => {
        context.commit('ADD', value)
      }, 500)
    }
  },
  getters: {
    countPlus (state) {
      return state.count * 10
    }
  }
}
